package com.aw.qzblog.utils;

import java.security.SecureRandom;

public class StrUtl {
    private static final String STR_TEMP = "QWERTYUIOASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890";

    private static final SecureRandom random = new SecureRandom();


    public static String getRandomStr(int length) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < length; i++) {
            sb.append(STR_TEMP.charAt(random.nextInt(STR_TEMP.length())));
        }
        return sb.toString();
    }
}
